chore: add group to readme#60
Conversation
|
|
|
||
| ### Grouping | ||
|
|
||
| Grouping prompts together is a great way to keep your code organized. This accepts a JSON object with a name that can be used to reference the group later. The second argument is an optional but has a `onCancel` callback that will be called if the user cancels one of the prompts in the group. |
There was a problem hiding this comment.
This accepts a JSON object with a name that can be used to reference the group later.
I don't understand this part. Care to explain?
To me, there's only one group of named prompts.
There was a problem hiding this comment.
it was meaning to say the first argument accepts an object and for each key correlates to a prompt function that then can be referenced within the return.
Might need to change the wording but if you have any suggestions to simplify I'll make those changes.
There was a problem hiding this comment.
Right, then we're on the same page regarding intended meaning. I don't think that's what it says right now, though.
It states the name can be used to reference the group, not the prompt.
I'll see what I can come up with.
On a related note, I think explanations of API parameters would be better suited for more structural API docs, but that's a whole other beast.
Updated README.md to include
groupfunction